# Nesting Elements

<EpicVideo url="https://www.epicreact.dev/workshops/react-fundamentals/nesting-elements" />

👨‍💼 See if you can figure out how to write the JavaScript + React code to
generate this DOM output:

```html
<div class="container">
	<span>Hello</span>
	<span>World</span>
</div>
```

Hint: You can either use the `children` prop or additional arguments after the
props. If you use the `children` prop, you will get a warning in the developer
console about needing a "key" prop. We'll get to that later.

Tip: You'll use `createElement` for the `span` elements, but to get the
space between them, you'll need to use a string (`' '`) to tell React to create
a [`textNode`](https://developer.mozilla.org/en-US/docs/Web/API/Text).

- [📜 `createElement`](https://react.dev/reference/react/createElement#createelement)
